#########################################################
#Figure 5: Expectations of Brexit Effect on National vs Personal Finances (BoE)
#########################################################

boeme2 <- read.dta13("./temp/fig5data.dta")
boeme2$varorder <- c(1,2,3,4,1,2,3,4)
boeme2$group <- c(1,1,1,1,2,2,2,2)
ggplot(boeme2, aes(as.factor(varorder), coef, color=as.factor(group))) + 
  geom_line(aes(group = group, color=as.factor(group)), linetype="solid", lwd=1.2) +
  geom_pointrange(aes(ymin=coef-1.96*stderr, ymax=coef + 1.96*stderr), shape=16, size=.8) +
  scale_color_manual(values=c("gray40",  "tan"), 
                     labels=c("Personal", "National"), name=" ") + 
  scale_x_discrete(labels=c("-1","0", "1", "2")) +
  theme_nice() + ylab("No Change in Circumstances Expected from Leave") + xlab("Property Wealth") + 
  theme(axis.title = element_text(size=14),
        axis.text = element_text(size=12),
        panel.grid.major = element_line(linetype="solid"))  +
  scale_y_continuous(breaks=c(0.2,0.3,.4,.5,.6,.7), limits=c(0.2,0.7))
ggsave("./figures/fig5.pdf")
rm(boeme2)


